<html>
<head><meta charset="utf-8"><title>make_target_blocks rustc_mir · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/make_target_blocks.20rustc_mir.html">make_target_blocks rustc_mir</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="168546580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/make_target_blocks%20rustc_mir/near/168546580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> dlrobertson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/make_target_blocks.20rustc_mir.html#168546580">(Jun 19 2019 at 21:14)</a>:</h4>
<p><span class="user-mention" data-user-id="116118">@Matthew Jasper</span> Could I get a more in-depth description as to why the <code>make_target_blocks</code> closure is needed <a href="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/build/matches/mod.rs#L1218" target="_blank" title="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/build/matches/mod.rs#L1218">https://github.com/rust-lang/rust/blob/master/src/librustc_mir/build/matches/mod.rs#L1218</a></p>



<a name="168546665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/make_target_blocks%20rustc_mir/near/168546665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> dlrobertson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/make_target_blocks.20rustc_mir.html#168546665">(Jun 19 2019 at 21:16)</a>:</h4>
<p>I was doing some work on or-patterns and I'm currently lowering the pattern all the way down to <code>rustc_mir::build</code>. My plan was to call <code>perform_test</code> on each of the "sub-tests"</p>



<a name="168585425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/make_target_blocks%20rustc_mir/near/168585425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/make_target_blocks.20rustc_mir.html#168585425">(Jun 20 2019 at 10:57)</a>:</h4>
<p>Its from <a href="https://github.com/rust-lang/rust/pull/60730/commits/a1d0266878793bc8b2bf50958eb529005ed19da0" target="_blank" title="https://github.com/rust-lang/rust/pull/60730/commits/a1d0266878793bc8b2bf50958eb529005ed19da0">this commit</a></p>



<a name="168585439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/make_target_blocks%20rustc_mir/near/168585439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/make_target_blocks.20rustc_mir.html#168585439">(Jun 20 2019 at 10:57)</a>:</h4>
<p>to resolve the regression recorded <a href="https://perf.rust-lang.org/compare.html?start=b8e0d0a2aa4f18d76a701150fccb67533f377368&amp;end=df9b1d3544db8928630d7096b01503aaa8627933" target="_blank" title="https://perf.rust-lang.org/compare.html?start=b8e0d0a2aa4f18d76a701150fccb67533f377368&amp;end=df9b1d3544db8928630d7096b01503aaa8627933">here</a></p>



<a name="168585452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/make_target_blocks%20rustc_mir/near/168585452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/make_target_blocks.20rustc_mir.html#168585452">(Jun 20 2019 at 10:57)</a>:</h4>
<p>(in compiling the encoding benchmark, at the top of the list; -10.5%)t</p>



<a name="168585540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/make_target_blocks%20rustc_mir/near/168585540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/make_target_blocks.20rustc_mir.html#168585540">(Jun 20 2019 at 10:59)</a>:</h4>
<p>namely, LLVM has an easier time dong its optimization if the control-flow-target block is created after the test itself, if I understand correctly.</p>



<a name="168596240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/make_target_blocks%20rustc_mir/near/168596240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> dlrobertson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/make_target_blocks.20rustc_mir.html#168596240">(Jun 20 2019 at 13:42)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> Ah! that make sense... thanks for the explination</p>



<a name="168596325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/make_target_blocks%20rustc_mir/near/168596325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> dlrobertson <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/make_target_blocks.20rustc_mir.html#168596325">(Jun 20 2019 at 13:44)</a>:</h4>
<p>I'll either have to adjust my current plan for building the test for or-patterns or move <code>perform_test</code> from accepting a closure to something else.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>